home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d7 / lanuts.arc / DEFS.INC < prev    next >
Text File  |  1991-10-30  |  2KB  |  95 lines

  1. ;
  2. ; Structure and constant definitions for MESSAGE.ASM
  3. ;
  4.  
  5. message_buffer    struc
  6.    MB_reserved     db 0        ; Reserved field used by system call
  7.    MB_type     db 0        ; User defined message type
  8.    MB_machine     db 16 dup (0)    ; Machine name that message is destined for
  9.    MB_server     db 16 dup (0)    ; User must be logged into this server
  10.    MB_user     db 16 dup (0)    ; User must be using this username
  11.    MB_originator db 16 dup (0)  ; Originator's machine name. Filled in
  12.                 ; when message is received
  13.    MB_text     db 80 dup (0)    ; Message text
  14. message_buffer    ends
  15.  
  16. field_desc    struc
  17.    FD_index    db 0        ; current pointer position in string
  18.    FD_length    db 0        ; length of string
  19.    FD_maxlen    db 0        ; maximum length of field
  20.    FD_data    dw 0        ; offset of string start in current DS
  21. field_desc    ends
  22.  
  23. MBT_general    equ 0        ; General message used by NET.
  24. MBT_warning    equ 1        ; Server warning message.
  25.  
  26. IF1             ;; Macro Definitions
  27. ;;** PushAll
  28. @PushAll    MACRO
  29.     push ax
  30.     push bx
  31.     push cx
  32.     push dx
  33.     push bp
  34.     push di
  35.     push si
  36.     push ds
  37.     push es
  38.     pushf
  39.     cld
  40. ENDM
  41.  
  42. ;; *** PopAll
  43. @PopAll    MACRO
  44.     popf
  45.     pop    es
  46.     pop    ds
  47.     pop    si
  48.     pop    di
  49.     pop    bp
  50.         pop    dx
  51.         pop    cx
  52.         pop    bx
  53.         pop    ax
  54. ENDM        
  55.  
  56. ;;** NewStack - switch to new stack context
  57. @NewStack    MACRO
  58.     cli
  59.     mov    cs:new_stk_seg,cs
  60.     mov    cs:old_stk_seg,ss
  61.     mov    cs:old_stk_ptr,sp
  62.     mov    ss,cs:new_stk_seg
  63.     mov    sp,cs:new_stk_ptr
  64.     @PushAll
  65.     sti
  66. ENDM
  67.  
  68. ;; OldStack --
  69. @OldStack    MACRO    
  70.     cli
  71.     @PopAll
  72.     mov    ss,cs:old_stk_seg
  73.     mov    sp,cs:old_stk_ptr
  74.     sti
  75. ENDM
  76.  
  77. PUTC    MACRO     char,count
  78.     mov    al,char
  79.     mov    cx,count
  80.     call    PUTCHAR
  81. ENDM    
  82. MOVE_CURSOR    MACRO    row,column
  83.     mov    dh,row
  84.     mov    dl,column
  85.     call    CURSOR
  86. ENDM
  87. DRAW_LINE    MACRO    start,middle,end,row
  88.     mov    al,start
  89.     mov    ah,middle
  90.     mov    bl,end
  91.         mov    bh,row
  92.         call    LINE
  93.     ENDM        
  94.  
  95. ENDIF